﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class IntervalCommonTypeElement : SyntaxTreeElement, ICommonTypeElement
    {
        private IntervalVariableExpressionElement interval;

        public IntervalVariableExpressionElement Interval { get { return interval; } set { interval = value; } }

        public IntervalCommonTypeElement(TokenInfo StartInfo, IntervalVariableExpressionElement Interval, List<TokenInfo> Comments)
            : base(StartInfo, Comments)
        {
            interval = Interval;
        }

        public override string ToString()
        {
            return interval.ToString();
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            yield return interval;
        }
    }
}
